/*
 *   api接口统一管理
 */
import {get, post, post2 } from './http'
/**
 * 获取微信jssdk签名
 */
export const wxConfigApi = (params) => get('api/user/wxshare_package', params);
/**
 * 第三方登录
 */
export const otherLogin = (params) => post('api/user/third', params);
/**
 * 验证码
 */
export const sendCode = (params) => get('api/user/send_code', params);
/**
 * 图片上传
 */
export const SetImg = (params) => post2('api/Manystore/upload', params);
/**
 * 银行
 */
export const supportbank = (params) => post('api/bank/bank_list', params);

/*
 ********************* 首页模块*************
 */
/**
 * 首页接口
 */
export const home = (params) => get('api/index/index', params);
/**
 * 首页底部分类
 */
export const homeItem = (params) => get('api/index/goodslist', params);
export const homeItems = (params) => get('api/index/ajax_category_goods', params);
/**
 * 商品详情
 */
export const gDetail = (params) => get('api/index/goods_detail', params);
/**
 * 商品规格信息
 */
export const goodsSpec = (params) => get('api/index/goods_spec_info', params);
/**
 * 获取购物车里商品数量
 */
export const cartNums = (params) => get('api/cart/get_cart_num', params);
/**
 * 购物车
 */
export const cart = (params) => get('api/cart/getcart', params);
/**
 * 加入购物车
 */
export const addIncart = (params) => get('api/cart/add_cart', params);
/**
 * 删除购物车
 */
export const cartDel = (params) => get('api/cart/cart_del', params);
/**
 * 购物车数量加减
 */
export const cartEdit = (params) => get('api/cart/cart_edit', params);
/**
 * 确认订单
 */
export const placeholder = (params) => post('api/order/payment', params);
/**
 * 提交订单
 */
export const submitOrder = (params) => post('api/order/createorder', params);
/**
 * 订单支付
 */
export const orderpay = (params) => post('api/pay/pays', params);
/**
 * 判断订单支付
 */
export const payCheck = (params) => post('api/order/checkpay', params);
/**
 * 秒杀首页
 */
export const seckillIndex = (params) => get('api/Seckill/index', params);
/**
 * 秒杀商品
 */
export const seckillGoods = (params) => get('api/Seckill/ajax_get_goods', params);
/**
 * 商户升级
 */
export const reqStore = (params) => post('api/Manystore/promote', params);
/**
 * 公告列表
 */
export const annList = (params) => post('api/Article/article_list', params);
/**
 * 公告详情
 */
export const annDetail = (params) => post('api/Article/article_details', params);
/**
 * 公告详情
 */
export const storeCoupons = (params) => get('api/coupon/merch_coupon_list', params);
/**
 * 全部评论
 */
export const allevaluates = (params) => get('api/index/comment_list', params);

/**
 ********************* 个人中心模块*************
 */
/**
 * 个人中心
 */
export const centers = (params) => post('api/Mycenter/userInfo', params);
/**
 * 修改个人资料
 */
export const changeInfo = (params) => post('api/user/profile', params);
/**
 * 意见反馈
 */
export const feedBack = (params) => post('api/user/feedback', params);
/**
 * 优惠券
 */
export const mycoupon = (params) => get('api/coupon/userCouponList', params);
/**
 * 优惠券兑换
 */
export const couexchange = (params) => get('api/coupon/exchange', params);
/**
 * 优惠券中心
 */
export const couponcenter = (params) => post('api/coupon/coupon_list', params);
/**
 * 领取优惠券
 */
export const getcoupon = (params) => post('api/coupon/getCoupon', params);
/**
 * 收藏列表
 */
export const collectlist = (params) => post('api/collection/getCollectLists', params);
/**
 * 添加、取消收藏
 */
export const collectedit = (params) => post('api/collection/setCollect', params);
/**
 * 举报
 */
export const reportact = (params) => post('api/Order/report', params);
/**
 * 举报类型
 */
export const reporttypes = (params) => post('api/Order/getReportType', params);

/**
 ********************* 设置模块*************
 */
/**
 * 登录
 */
export const login = (params) => post('api/user/mobilelogin', params);
/**
 * 登录
 */
export const oldLogin = (params) => post('api/User/login', params);
/**
 * 用户协议
 */
export const treatys = (params) => post('api/user/agreement', params);
/**
 * 换绑手机号
 */
export const changeBind = (params) => post('api/user/changemobile', params);
/**
 * 设置提现、支付密码
 */
export const setPwds = (params) => post('api/Mycenter/set_password', params);
/**
 * 修改提现、支付密码
 */
export const changePwds = (params) => post('api/Mycenter/edit_password', params);
/**
 * 找回支付密码
 */
export const findPwd = (params) => post('api/Mycenter/retrieve_pwd', params);

/**
 ********************* 店铺模块*************
 */
/**
 * 店铺首页
 */
export const stores = (params) => post('api/Merch/index', params);
/**
 * 店铺商品列表
 */
export const storeGlist = (params) => post('api/Merch/manystore_list', params);
/**
 * 店铺分类
 */
export const storeClassify = (params) => post('api/Merch/manystore_category', params);
/**
 * 店铺活动
 */
export const storeAct = (params) => post('api/Merch/activity', params);
/**
 * 店铺活动
 */
export const storeNew = (params) => post('api/Merch/manystore_new', params);
/**
 * 店铺信息
 */
export const aboutStore = (params) => post('api/Merch/manystore_info', params);
/**
 * 全部地址
 */
export const allAddress = (params) => post('api/Manystore/allAreas', params);


/**
 ********************* 地址模块*************
 */
/**
 * 地址列表
 */
export const addresses = (params) => post('api/Adress/getAddress', params);
/**
 * 添加地址
 */
export const addAaddress = (params) => post('api/Adress/addAddress', params);
/**
 * 删除地址
 */
export const delAddress = (params) => post('api/Adress/delAddress', params);
/**
 * 默认地址
 */
export const defAddress = (params) => post('api/Adress/setDefault', params);
/**
 * 默认地址
 */
export const editAddress = (params) => post('api/Adress/updateAddress', params);


/**
 ********************* 分销中心模块*************
 */
/**
 * 银行卡列表
 */
export const bankcardlist = (params) => post('api/bank/user_bank_list', params);
/**
 * 银行卡添加
 */
export const bankcardadd = (params) => post('api/bank/save_bank_card', params);
/**
 * 银行卡删除
 */
export const bankcarddel = (params) => post('api/bank/delete_bank_card', params);
/**
 * 分成概况
 */
export const earndetail = (params) => post('api/dxm/profit_general', params);
/**
 * 我的伞下
 */
export const umbrellas = (params) => post('api/dxm/myumbrella', params);
/**
 * 订单记录
 */
export const orderHis = (params) => post('api/dxm/user_order_list', params);
/**
 * 预估收益
 */
export const possibleEarn = (params) => post('api/dxm/estimate_info', params);
/**
 * 提现页面
 */
export const cashCenter = (params) => post('api/user/mywithdraw', params);
/**
 * 收益明细
 */
export const cashdetail = (params) => post('api/user/mybalance', params);
/**
 * 提现
 */
export const cashed = (params) => post('api/bank/apply_withdraw', params);
/**
 * 邀请好友
 */
export const inviteShare = (params) => post('api/index/invite', params);
/**
 * 规则说明
 */
export const rules = (params) => post('api/index/newsdetail', params);


/**
 ********************* 订单模块*************
 */
/**
 * 我的订单
 */
export const myorder = (params) => get('api/order/orderlist', params);
/**
 * 订单详情
 */
export const orderdetail = (params) => get('api/order/detail', params);
/**
 * 取消订单
 */
export const ordercancel = (params) => post('api/order/cancel', params);
/**
 * 删除订单
 */
export const orderdel = (params) => post('api/order/del', params);
/**
 * 确认收货
 */
export const surerecive = (params) => get('api/order/finish', params);
/**
 * 订单评价
 */
export const makeevaluate = (params) => post('api/order/evaluate', params);
/**
 * 信息物流
 */
export const look = (params) => post('api/order/lookLogistics', params);


/**
 ********************* 拼团模块*************
 */
/**
 * 拼团首页
 */
export const groupIndex = (params) => get('api/groupbuy/index', params);
/**
 * 参团信息
 */
export const groupinfos = (params) => get('api/Marketing/groupbuying', params);

/**
 ********************* 搜索模块*************
 */
/**
 * 搜索
 */
export const searchIndex = (params) => get('api/index/search', params);
/**
 * 搜索结果
 */
export const searchResult = (params) => post('api/index/searchlist', params);
/**
 * 清除历史记录
 */
export const clearall = (params) => post('api/index/clear_history', params);


/**
 ********************* 售后模块*************
 */
/**
 * 售后订单
 */
export const afterOrder = (params) => get('api/refund/lists', params);
/**
 * 售后订单详情
 */
export const afterOrderDetail = (params) => get('api/refund/detail', params);
/**
 * 获取售后商品
 */
export const afterLists = (params) => post('api/refund/order_goods', params);
/**
 * 获取售后信息页面
 */
export const afterIndex = (params) => post('api/refund/refund_goods', params);
/**
 * 售后申请
 */
export const aftersubmit = (params) => post('api/refund/batchApply', params);
/**
 * 取消售后申请
 */
export const cancelafter = (params) => post('api/refund/cancel', params);
/**
 * 填写单号
 */
export const filltext = (params) => post('api/refund/delivery', params);
/**
 * 新人优惠券
 */
export const newsact = (params) => post('api/coupon/newuser_coupon', params);